package icu.decade.store.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * @author qk
 * @version 1.0
 * @className SwaggerProperties
 * @description
 * @date 2023/6/20 19:41
 **/
@Data
@ConfigurationProperties("swagger.properties")
public class SwaggerProperties {
    private boolean enable;
    private String title;
    private String description;
    private String version;
    private String termUrl;
    private Contact contact = new Contact();
    private String license;
    private String licenseUrl;
    private String basePackage;

    @Data
    @ConfigurationProperties("swagger.properties.contact")
    public static class Contact{
        private String name;
        private String url;
        private String email;
    }

    public String name() {
        return contact.getName();
    }

    public String url() {
        return contact.getUrl();
    }

    public String email() {
        return contact.getEmail();
    }
}
